package com.joeyzh.base.filter;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.joeyzh.table.BaseTableLogFragment;

/**
 * Created by xuHuanLin on 2019/4/22.
 *
 * @author xuHuanLin
 * @Description
 * 可自定义表单的搜索控件
 */

public abstract class BaseTableFilterFragment<Presenter extends BaseFilterPresenter> extends BaseTableLogFragment {

    protected Presenter presenter;
    protected FilterResultInterface resultInterface;

    @Override
    public void initData() {
        super.initData();
        createPresenter();
        presenter.setResultInterface(resultInterface);
    }

    /**
     * 创建
     *
     * @return
     */
    public abstract Presenter createPresenter();

    public void setResultInterface(FilterResultInterface resultInterface) {
        this.resultInterface = resultInterface;
        presenter.setResultInterface(resultInterface);
    }
}
